package com.biz.primus.ms.depot.dao.po;


import com.biz.primus.model.depot.enums.EmployeeRankEnum;
import com.biz.primus.ms.base.jpa.po.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * 门店员工
 *
 * @author JKLiues
 * @date 2017/10/12
 */

@Entity
@Table(name = "tb_depot_employee",
        indexes = {
                @Index(columnList = "depotCode"),
                @Index(columnList = "employeeCode")
        })
@Getter
@Setter
public class Employee extends BaseEntity {

    private static final long serialVersionUID = 2225177378975174462L;

    /**
     * 员工编码
     */
    @Column(length = 50, nullable = false, unique = true)
    private String employeeCode;


    /**
     * 员工所在门店编码
     */
    @Column(length = 50)
    private String depotCode;

    /**
     * 员工姓名
     */
    @Column(length = 50)
    private String name;

    /**
     * 联系方式
     */
    @Column(length = 50)
    private String mobile;

    /**
     * 员工职位级别
     */
    @Column(length = 50)
    @Enumerated(EnumType.STRING)
    private EmployeeRankEnum identity;


    @Column
    private Timestamp beginTime;

    @Column
    private Timestamp endTime;

}
